<html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<head>
<title>NaCl Cross-origin Test</title>
</head>
<body>
<h2>NaCl Cross-origin Test</h2>
</body>
<script type="text/javascript" src="../load_util.js"></script>
<script>

function run() {
  var embed = load_util.crossOriginEmbed("cors.nmf");
  // The cross-origin load will succeed due to the server returning CORS
  // headers.
  // ... but the nexe is junk data, it can't be parsed.
  // This error string comes from the NaCl repo:
  // native_client/src/trusted/service_runtime/nacl_error_code.c
  load_util.expectLoadFailure(embed, "Bad ELF header magic number");
  document.body.appendChild(embed);
}

run();

</script>
</html>
